﻿using System.Collections.ObjectModel;
using Microsoft.Practices.Prism.Commands;

namespace KlavoNotifications.ViewModels.MainWindow
{
    public class MainViewModel
    {
        private readonly ObservableCollection<GameItemViewModel> _items;
        private readonly DelegateCommand _updateCommand;

        public MainViewModel()
        {
            _items = new ObservableCollection<GameItemViewModel>();
            _updateCommand = new DelegateCommand(UpdateCommandExecuted);
        }

        public ObservableCollection<GameItemViewModel> Items
        {
            get { return _items; }
        }

        public DelegateCommand UpdateCommand
        {
            get { return _updateCommand; }
        }

        private void UpdateCommandExecuted()
        {
            Update();
        }

        private void Update()
        {
            _items.Clear();

        }
    }
}